<%@page import="com.bringway.framework.util.DateUtils"%>
<%@page import="org.springframework.security.core.context.SecurityContextHolder"%>
<%@page import="com.bringway.global.domain.SysUserDetails"%>
<%@page import="com.bringway.global.domain.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<title>红点e贷服务管理系统</title>
<%
	SysUserDetails sysUserDetails =	(SysUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	String gyh = "",username="",roleId="",roleName="",sjhm="";
	if(null != sysUserDetails){
		gyh = sysUserDetails.getGyh();
		username = sysUserDetails.getUsername();
		roleId = sysUserDetails.getRoleId();
		roleName = sysUserDetails.getRoleName();
		sjhm = sysUserDetails.getSjhm();
	}
	System.out.println("gyh : " + gyh);
	System.out.println("username : " + username);
	System.out.println("roleId : " + roleId);
	System.out.println("roleName : " + roleName);
	System.out.println("sjhm : " + sjhm);
%>
<jsp:include page="/global/common.jsp"  flush="true"/>
<style>
html,body{
 height:100%;
}
* {
	margin: 0;
	padding: 0;
}
.btn{width:56px;margin-left:10px;height: 19px;border:none;background:#109BD0;color:white;cursor: pointer;}</style>
<script type="text/javascript" src="Main.js"></script>
<script type="text/javascript" src="ChanagePassword.js"></script>
<script type="text/javascript">
	var baseUrl = '<%=request.getContextPath()%>';
	var gyh = '<%=gyh%>';
	var sjhm = '<%=sjhm%>';
	var username = '<%=username%>';
	var roleId = '<%=roleId%>';
	var roleName = '<%=roleName%>';
	var nowDate = '<%=DateUtils.getCurrentDataStr()%>';
	Ext.onReady(function(){
		new Ext.Viewport({
			layout : 'fit',
			border : false,
			items : [new pages.main.Main()]
		});
		var win1 = new Ext.Window({
			width : 600,
			height : 350,
		    layout : 'fit',
			border : false,
			buttonAlign:'center',
			html: "<style type='text/css'> .win{height:340px;width:590px; margin:auto;  padding:2px;  }</style> <div  onmouseover='clearTimeout(8);'><iframe src='news.jsp' class='win'></iframe></div>",
			buttons: [{
                    text: '关闭窗口',
                    handler: function(){
                        win1.close();
                    }
                }],
           listeners:{
        	   'render': function() {
        		   var i ;
                   this.getEl().on('mouseleave', function(e, t, eOpts) {i = window.setTimeout(func,1500);});
                   this.getEl().on('mouseover', function(e, t, eOpts) {clearTimeout(i);});
               }
           }
		});
		win1.show();
		function func(){
		  win1.close();
		}
		window.setTimeout(func,5000);
	});
</script>
</head>
<body>
</body>
</html>